import pandas as pd
import requests
import json
from datetime import datetime

# 读取 Excel 文件并指定 sheet 页
excel_file_path = r'C:\Users\luowenjie\Desktop\客服热线\数据\uservoice_task.xlsx'
sheet_name = 'Sheet5'  # 替换为你的 sheet 页名称

# 使用 pandas 读取 Excel 文件
df = pd.read_excel(excel_file_path, sheet_name=sheet_name)

for idx, row in df.iterrows():
    uid = row['uid'] if pd.notna(row['uid']) else ""  # uid
    #api_url = f"http://43.138.150.59:8088/nbpAdmin/dataFill/updateLinkId?id={uid}&linkId="
    api_url = f"http://43.138.150.59:8088/nbpAdmin/dataFill/startAnalyzeTask?ids={uid}"
    print(f"api_url:{api_url}")
    payload = {}
    headers = {}
    response = requests.request("GET", api_url, headers=headers, data=payload)
    print(f"提交分析成功")

